using System;
using System.Collections.Generic;
using System.Text;

namespace Bots
{
    public enum ObjectStatue { 
        New,
        Delete,
        Update,
        UnKnown
    }

    [Serializable]
    public class DomainObject:IDomainObject
    {
        protected long id = 0;
        protected long parentId = 0;

        private ObjectStatue status = ObjectStatue.UnKnown;

        public ObjectStatue ObjectStatue
        {
            get { return this.status; }
            set { this.status = value; }
        }

        public DomainObject() {
            this.status = ObjectStatue.New;
            this.id = -1;
        }

        public DomainObject(long id)
        {
            this.id = id;
        }
        #region IDomainObject members

        public long ID
        {
            get { return id; }
            set { throw new NotSupportedException(); }
        }

        public long ParentID {
            get { return this.parentId; }
            set { this.parentId = value; }
        }

        public bool IsEmpty() {
            return (id == -1);
        }

        #endregion
    }
}
